package com.glsc.ngateway.common.base.repo.mysql.gateway.platform.it.networkAssets.dict;

import com.glsc.ngateway.common.base.domain.mysql.gateway.platform.it.networkassets.dict.ItNetworkAssetsDictFieldValue;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ItNetworkAssetsDictFieldValueRepo extends JpaRepository<ItNetworkAssetsDictFieldValue, Integer> {

    void deleteAllByDictFieldCodeIn(List<String> dictFieldCodeList);

    List<ItNetworkAssetsDictFieldValue> findAllByDictFieldCodeIn(List<String> delFieldCodeList);

    void deleteAllByIdIn(List<Long> delValueIdList);

    List<ItNetworkAssetsDictFieldValue> findAllByDictCode(String dictCode);

    List<ItNetworkAssetsDictFieldValue> findAllByRecordId(Long recordId);

    List<ItNetworkAssetsDictFieldValue> findAllByDictCodeInAndDictFieldCodeIn(List<String> delDictCodeList, List<String> delFieldCodeList);

    void deleteByDictFieldCodeAndRecordId(String fieldCode, Long recordId);

    void deleteAllByRecordIdIn(List<Long> delRecords);
}
